import { Product, User, Order, Category, UnboxResult, SignInRecord, SignInReward, LotteryPrize, LotteryResult } from './types';

// 商品分类
export const categories: Category[] = [
  {
    id: 'virtual',
    name: '虚拟物品盲盒',
    icon: '💳',
    description: '优惠券、会员卡、代金券等虚拟好礼'
  },
  {
    id: 'digital',
    name: '数码盲盒',
    icon: '📱',
    description: '耳机、充电宝、数据线、鼠标键盘等数码好物'
  },
  {
    id: 'food',
    name: '美食盲盒',
    icon: '🍔',
    description: '酒店自助、奶茶、快餐、面包等美食体验'
  },
  {
    id: 'anime',
    name: '二次元手办盲盒',
    icon: '🎭',
    description: '动漫手办、周边、限定收藏品等二次元好物'
  }
];

// 商品数据
export const products: Product[] = [
  // 虚拟物品盲盒
  {
    id: '1',
    name: '会员卡惊喜盒',
    price: 15.9,
    originalValue: '30-100元',
    description: '爱奇艺、网易云、腾讯视频等会员卡',
    category: 'virtual',
    bgColor: 'from-purple-400 to-pink-500',
    stock: 299,
    image: '/api/placeholder/300/200',
    probability: '大奖概率15%'
  },
  {
    id: '2',
    name: '优惠券大礼包',
    price: 9.9,
    originalValue: '20-50元',
    description: '美团、饿了么、滴滴等优惠券组合',
    category: 'virtual',
    bgColor: 'from-red-400 to-orange-500',
    stock: 588,
    image: '/api/placeholder/300/200',
    probability: '大奖概率25%'
  },
  {
    id: '3',
    name: '游戏代金券盒',
    price: 39.9,
    originalValue: '60-150元',
    description: 'Steam、王者荣耀、原神等游戏代金券',
    category: 'virtual',
    bgColor: 'from-indigo-400 to-purple-600',
    stock: 156,
    image: '/api/placeholder/300/200',
    probability: '大奖概率20%'
  },

  // 数码盲盒
  {
    id: '4',
    name: '数码配件惊喜盒',
    price: 29.9,
    originalValue: '50-200元',
    description: '蓝牙耳机、充电宝、数据线等数码好物',
    category: 'digital',
    bgColor: 'from-slate-400 to-slate-600',
    stock: 234,
    image: '/api/placeholder/300/200',
    probability: '大奖概率18%'
  },
  {
    id: '5',
    name: '外设装备盒',
    price: 89.9,
    originalValue: '150-400元',
    description: '机械键盘、游戏鼠标、鼠标垫等外设',
    category: 'digital',
    bgColor: 'from-blue-500 to-cyan-600',
    stock: 89,
    image: '/api/placeholder/300/200',
    probability: '大奖概率30%'
  },
  {
    id: '6',
    name: '科技潮品大箱',
    price: 199,
    originalValue: '300-800元',
    description: '智能手环、无线充电器、蓝牙音箱等',
    category: 'digital',
    bgColor: 'from-gray-600 to-gray-800',
    stock: 45,
    image: '/api/placeholder/300/200',
    probability: '大奖概率35%'
  },

  // 美食盲盒
  {
    id: '7',
    name: '奶茶券惊喜盒',
    price: 19.9,
    originalValue: '30-80元',
    description: '喜茶、奈雪、星巴克等知名奶茶券',
    category: 'food',
    bgColor: 'from-yellow-400 to-orange-500',
    stock: 367,
    image: '/api/placeholder/300/200',
    probability: '大奖概率20%'
  },
  {
    id: '8',
    name: '快餐美食盒',
    price: 35.9,
    originalValue: '60-120元',
    description: '麦当劳、肯德基、必胜客等快餐券',
    category: 'food',
    bgColor: 'from-red-400 to-pink-500',
    stock: 178,
    image: '/api/placeholder/300/200',
    probability: '大奖概率25%'
  },
  {
    id: '9',
    name: '酒店自助餐盒',
    price: 129,
    originalValue: '200-500元',
    description: '五星级酒店自助餐券、火锅券等',
    category: 'food',
    bgColor: 'from-amber-500 to-red-600',
    stock: 56,
    image: '/api/placeholder/300/200',
    probability: '大奖概率40%'
  },
  {
    id: '10',
    name: '面包甜品盒',
    price: 25.9,
    originalValue: '40-100元',
    description: '85度C、面包新语、好利来等烘焙券',
    category: 'food',
    bgColor: 'from-orange-300 to-yellow-500',
    stock: 234,
    image: '/api/placeholder/300/200',
    probability: '大奖概率15%'
  },

  // 二次元手办盲盒
  {
    id: '11',
    name: '动漫手办小盒',
    price: 59.9,
    originalValue: '80-200元',
    description: '火影、海贼王、鬼灭之刃等热门手办',
    category: 'anime',
    bgColor: 'from-pink-400 to-purple-600',
    stock: 145,
    image: '/api/placeholder/300/200',
    probability: '稀有概率12%'
  },
  {
    id: '12',
    name: '二次元周边盒',
    price: 39.9,
    originalValue: '60-150元',
    description: '徽章、贴纸、钥匙扣、抱枕等周边',
    category: 'anime',
    bgColor: 'from-cyan-400 to-blue-600',
    stock: 289,
    image: '/api/placeholder/300/200',
    probability: '稀有概率18%'
  },
  {
    id: '13',
    name: '限定收藏大箱',
    price: 299,
    originalValue: '500-1200元',
    description: '限定手办、签名周边、绝版收藏品',
    category: 'anime',
    bgColor: 'from-violet-500 to-purple-800',
    stock: 23,
    image: '/api/placeholder/300/200',
    probability: '传说概率45%'
  },
  {
    id: '14',
    name: 'Cosplay道具盒',
    price: 89.9,
    originalValue: '120-300元',
    description: 'Cosplay服装、假发、道具等',
    category: 'anime',
    bgColor: 'from-fuchsia-400 to-pink-600',
    stock: 67,
    image: '/api/placeholder/300/200',
    probability: '稀有概率28%'
  }
];

// 模拟用户数据
export const mockUser: User = {
  id: '1',
  name: '神秘开箱者',
  avatar: '/api/placeholder/80/80',
  phone: '138****8888',
  email: 'user@xiangye.com',
  balance: 268.5,
  points: 1280,
  memberLevel: 'gold'
};

// 模拟订单数据
export const mockOrders: Order[] = [
  {
    id: 'ORD001',
    userId: '1',
    items: [
      { product: products[0], quantity: 2 },
      { product: products[1], quantity: 1 }
    ],
    total: 119.7,
    status: 'completed',
    createdAt: '2024-01-15',
    trackingNumber: 'SF1234567890',
    unboxed: true
  },
  {
    id: 'ORD002',
    userId: '1',
    items: [
      { product: products[2], quantity: 1 }
    ],
    total: 199,
    status: 'delivered',
    createdAt: '2024-01-18',
    trackingNumber: 'YT9876543210',
    unboxed: false
  },
  {
    id: 'ORD003',
    userId: '1',
    items: [
      { product: products[3], quantity: 1 }
    ],
    total: 499,
    status: 'shipped',
    createdAt: '2024-01-20',
    trackingNumber: 'ZTO1357924680'
  }
];

// 开箱结果数据
export const mockUnboxResults: UnboxResult[] = [
  {
    id: 'UBX001',
    orderId: 'ORD001',
    productName: '数码惊喜盲盒',
    actualItem: 'AirPods Pro 2代',
    actualValue: 1399,
    image: '/api/placeholder/200/200',
    satisfaction: 5,
    createdAt: '2024-01-16'
  },
  {
    id: 'UBX002',
    orderId: 'ORD001',
    productName: '数码惊喜盲盒',
    actualItem: '小米充电宝 20000mAh',
    actualValue: 149,
    image: '/api/placeholder/200/200',
    satisfaction: 4,
    createdAt: '2024-01-16'
  },
  {
    id: 'UBX003',
    orderId: 'ORD001',
    productName: '生活好物标准箱',
    actualItem: '戴森吹风机',
    actualValue: 2990,
    image: '/api/placeholder/200/200',
    satisfaction: 5,
    createdAt: '2024-01-16'
  }
];

// 签到奖励配置
export const signInRewards: SignInReward[] = [
  { day: 1, type: 'points', value: 10, description: '获得10积分' },
  { day: 2, type: 'points', value: 20, description: '获得20积分' },
  { day: 3, type: 'lottery_chance', value: 1, description: '获得1次抽奖机会' },
  { day: 4, type: 'points', value: 30, description: '获得30积分' },
  { day: 5, type: 'points', value: 50, description: '获得50积分' },
  { day: 6, type: 'lottery_chance', value: 2, description: '获得2次抽奖机会' },
  { day: 7, type: 'lottery_chance', value: 3, description: '获得3次抽奖机会' }
];

// 抽奖奖品池
export const lotteryPrizes: LotteryPrize[] = [
  {
    id: 'lottery-1',
    name: '优惠券礼包',
    type: 'product',
    value: 9.9,
    probability: 0.3,
    description: '价值9.9元的优惠券组合',
    image: '/api/placeholder/100/100',
    bgColor: 'from-red-300 to-orange-400'
  },
  {
    id: 'lottery-2',
    name: '奶茶券盒',
    type: 'product',
    value: 19.9,
    probability: 0.25,
    description: '价值19.9元的奶茶券盲盒',
    image: '/api/placeholder/100/100',
    bgColor: 'from-yellow-300 to-orange-500'
  },
  {
    id: 'lottery-3',
    name: '数码配件盒',
    type: 'product',
    value: 29.9,
    probability: 0.2,
    description: '价值29.9元的数码配件盲盒',
    image: '/api/placeholder/100/100',
    bgColor: 'from-blue-300 to-blue-500'
  },
  {
    id: 'lottery-4',
    name: '积分奖励',
    type: 'points',
    value: 100,
    probability: 0.15,
    description: '获得100积分',
    image: '/api/placeholder/100/100',
    bgColor: 'from-green-300 to-green-500'
  },
  {
    id: 'lottery-5',
    name: '会员卡盒',
    type: 'product',
    value: 15.9,
    probability: 0.08,
    description: '价值15.9元的会员卡盲盒',
    image: '/api/placeholder/100/100',
    bgColor: 'from-purple-300 to-purple-500'
  },
  {
    id: 'lottery-6',
    name: '二次元小物',
    type: 'product',
    value: 39.9,
    probability: 0.02,
    description: '价值39.9元的二次元周边盒',
    image: '/api/placeholder/100/100',
    bgColor: 'from-pink-300 to-purple-400'
  }
];

// 用户签到记录
export const mockSignInRecord: SignInRecord = {
  userId: '1',
  date: new Date().toISOString().split('T')[0], // 今天的日期
  consecutiveDays: 5,
  totalDays: 28,
  lastSignInDate: new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString().split('T')[0] // 昨天，确保今天未签到
};

// 抽奖结果记录
export const mockLotteryResults: LotteryResult[] = [
  {
    id: 'LTR001',
    userId: '1',
    prizeId: 'lottery-1',
    prizeName: '微型数码盒',
    prizeType: 'product',
    prizeValue: 9.9,
    createdAt: '2024-01-19',
    claimed: true
  },
  {
    id: 'LTR002',
    userId: '1',
    prizeId: 'lottery-4',
    prizeName: '积分奖励',
    prizeType: 'points',
    prizeValue: 100,
    createdAt: '2024-01-18',
    claimed: true
  },
  {
    id: 'LTR003',
    userId: '1',
    prizeId: 'lottery-2',
    prizeName: '小惊喜盒',
    prizeType: 'product',
    prizeValue: 19.9,
    createdAt: '2024-01-17',
    claimed: false
  }
];